package com.zhongxiangspace.enums;

/**
 * 分页
 */
public enum PagesEnum {

    PAGES_PV1("pv1",1),
    PAGES_PV2("pv2",2),
    PAGES_PV3("pv3",3),
    PAGES_PV4("pv4",4),
    PAGES_PV5("pv5",5),
    PAGES_PV6("pv6",6),
    PAGES_PV7("pv7",7),
    PAGES_PV8("pv8",8),
    PAGES_PV9("pv9",9),
    PAGES_PV10("pv10",10),
    PAGES_PV11("pv11",11),
    PAGES_PV12("pv12",12),
    PAGES_PV13("pv13",13),
    PAGES_PV14("pv14",14),
    PAGES_PV15("pv15",15),
    PAGES_PV16("pv16",16),
    PAGES_PV17("pv17",17),
    PAGES_PV18("pv18",18),
    PAGES_PV19("pv19",19),
    PAGES_PV20("pv20",20),
    PAGES_PV21("pv21",21),
    PAGES_PV22("pv22",22),
    PAGES_PV23("pv23",23),
    PAGES_PV24("pv24",24),
    PAGES_PV25("pv25",25),
    PAGES_PV26("pv26",26);
    private String name;
    private Integer index;

    public static PagesEnum getEnumObject(String name) {
        for (PagesEnum r : PagesEnum.values()) {
            if (r.getName().equals(name)) {
                return r;
            }
        }
        return PagesEnum.PAGES_PV1;
    }


    PagesEnum(String name, Integer index) {
        this.name = name;
        this.index = index;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getIndex() {
        return index;
    }

    public void setIndex(Integer index) {
        this.index = index;
    }
}
